package com.dodalizer.parser.source;

import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.NotImplementedException;

import com.dodalizer.parser.classes.JavaClass;

public class JavaSource extends Source {

    private JavaClass[] classes;
    private String pakkage;

    public JavaSource() {
        super.setLanguage("Java");
    }
    
    public JavaClass[] getClasses() {
        return classes;
    }

    public void setClasses(JavaClass[] classes) {
        this.classes = classes;
    }
    
    public void addClass(JavaClass clazz) {
        classes = (JavaClass[]) ArrayUtils.add(classes, clazz);
    }

    public String getPackage() {
        return pakkage;
    }

    public void setPackage(String pakkage) {
        this.pakkage = pakkage;
    }
    
    @Override
    public void setLanguage(String language) {
        throw new NotImplementedException("The language is pre set to: " + getLanguage());
    }
}
